package aenbike.main.maputilities;

import android.location.Location;

/////////////////////////////////////////////////////////////////////
//An object of type "MyLocater" will be used to pass data back and
//forth between the Android app and the JS code behind the html page.
/////////////////////////////////////////////////////////////////////
public class MyLocater {
	private Location mostRecentLocation;

	public void setNewLocation(Location newCoordinates) {
		mostRecentLocation = newCoordinates;
	}

	public double getLatitude() {
		if (mostRecentLocation == null)
			return (0);
		else
			return mostRecentLocation.getLatitude();
	}

	public double getLongitude() {
		if (mostRecentLocation == null)
			return (0);
		else
			return mostRecentLocation.getLongitude();
	}
}// MyLocater

